package org.edu.modules.jxgz.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.text.ParseException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang.time.DateFormatUtils;
import org.edu.common.util.DateUtils;
import org.edu.modules.jxgz.util.VeJwTextUtils;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.edu.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: ve_jw_teachact
 * @Author: jeecg-boot
 * @Date:   2021-05-26
 * @Version: V1.0
 */
@Data
@TableName("ve_jw_teachact")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="ve_jw_teachact对象", description="ve_jw_teachact")
public class VeJwTeachact implements Serializable {
    private static final long serialVersionUID = 1L;

	/**id*/
	@TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "id")
    private Integer id;
	/**活动名称*/
	@Excel(name = "活动名称", width = 15)
    @ApiModelProperty(value = "活动名称")
    private String actname;
	/**班级ID*/
	@Excel(name = "班级ID", width = 15)
    @ApiModelProperty(value = "班级ID")
    private Integer bjid;
	/**班级名称*/
	@Excel(name = "班级名称", width = 15)
    @ApiModelProperty(value = "班级名称")
    private String bjname;
	/**活动人数*/
	@Excel(name = "活动人数", width = 15)
    @ApiModelProperty(value = "活动人数")
    private Integer personnum;
	/**地址*/
	@Excel(name = "地址", width = 15)
    @ApiModelProperty(value = "地址")
    private String address;
	/**活动时间*/
	@Excel(name = "活动时间", width = 15)
    @ApiModelProperty(value = "活动时间")
    private Integer acttime;
    /**
     * 活动时间
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
	private transient Date acttimeDate;

	/**带队教师ID*/
	@Excel(name = "带队教师ID", width = 15)
    @ApiModelProperty(value = "带队教师ID")
    private Integer teacherid;
	/**活动状态*/
	@Excel(name = "活动状态", width = 15)
    @ApiModelProperty(value = "活动状态")
    private Integer actstatus;
	/**创建时间*/
	@Excel(name = "创建时间", width = 15)
    @ApiModelProperty(value = "创建时间")
    private Integer createtime;
	/**设备ID*/
	@Excel(name = "设备ID", width = 15)
    @ApiModelProperty(value = "设备ID")
    private Integer terminalid;
	/**活动介绍*/
	@Excel(name = "活动介绍", width = 15)
    @ApiModelProperty(value = "活动介绍")
    private String content;

    public Integer getActtime() {
        if (acttimeDate != null) {
            String temp  = String.valueOf(acttimeDate.getTime() / 1000);
            acttime = Integer.valueOf(temp);
        }
        return acttime;
    }

    public void setActtime(Integer acttime) {
        this.acttime = acttime;
    }

    public Date getActtimeDate() {
        if (acttimeDate == null && acttime != null) {
            BigDecimal temp = new BigDecimal("1000");
            String s = BigDecimal.valueOf(acttime).multiply(temp).toString();
            acttimeDate = VeJwTextUtils.stampToDate(s);
        }
        return acttimeDate;
    }

    public void setActtimeDate(Date acctimeDate) {
        this.acttimeDate = acctimeDate;
    }
}

